package com.indiemaps.visualization.flare.renderers
{
	import flare.vis.data.DataSprite;
	import flare.vis.data.render.IRenderer;

	public class CircleRadiusRenderer implements IRenderer
	{
		private var _strokeWidth : int = 1;
		private var _strokeColor : uint = 0xffffff;
		private var _strokeAlpha : Number = 1;
		
		private var _fillColor : uint = 0;
		private var _fillAlpha : Number = 1;
		
		public function CircleRadiusRenderer( strokeWidth : int, strokeColor : uint, strokeAlpha : Number, fillColor : uint, fillAlpha : Number )
		{
			_strokeWidth = strokeWidth;
			_strokeColor = strokeColor;
			_strokeAlpha = strokeAlpha;
			
			_fillColor = fillColor;
			_fillAlpha = fillAlpha;
		}

		public function render(d:DataSprite):void
		{
			with ( d.graphics ) {
				lineStyle( _strokeWidth, _strokeColor, _strokeAlpha );
				beginFill( _fillColor, _fillAlpha );
				drawCircle( 0, 0, d.size );
				endFill();
			}
		}
		
	}
}